using Refit;
using ZhaoXi.MSACommerce.CommonServiceClient;
using ZhaoXi.MSACommerce.CommonServiceClient.AspNetCore;
using ZhaoXi.MSACommerce.Consul.ServiceDiscovery;
using Zhaoxi.MSACommerce.OrderService.UseCases.Service;

namespace Zhaoxi.MSACommerce.OrderService.UseCases.Api;

public class ProductClient(IServiceDiscovery serviceDiscovery,
    ILoadBalancer<ProductClient> loadBalancer,
    HttpClient httpClient)
    : ServiceClient(serviceDiscovery, loadBalancer, httpClient)
{
    public override string ServiceName { get; set; } = "Zhaoxi.MSACommerce.ProductService.HttpApi";
    public readonly IProductClient UserServiceApi = RestService.For<IProductClient>(httpClient);
}